package com.azure.mapper.report;

import com.azure.entity.AUserDailyReport;
import com.azure.entity.AUserDailyReportExample;
import java.util.List;

import net.minidev.json.JSONObject;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface AUserDailyReportMapper {
    int countByExample(AUserDailyReportExample example);

    int deleteByExample(AUserDailyReportExample example);

    int deleteByPrimaryKey(Long id);

    int insert(AUserDailyReport record);

    int insertSelective(AUserDailyReport record);

    List<AUserDailyReport> selectByExample(AUserDailyReportExample example);

    AUserDailyReport selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") AUserDailyReport record, @Param("example") AUserDailyReportExample example);

    int updateByExample(@Param("record") AUserDailyReport record, @Param("example") AUserDailyReportExample example);

    int updateByPrimaryKeySelective(AUserDailyReport record);

    int updateByPrimaryKey(AUserDailyReport record);

    @Select("select date,sum(count) pcount from a_user_daily_report where date >= #{date} group by date")
    List<JSONObject> selectDailyCount(@Param("date")String date);
}